/**
 * 
 */
package com.pks.insurance.dao;

import java.util.List;

import com.pks.insurance.dto.CustomerDto;
import com.pks.insurance.helper.UserLevels;

/**
 * Contain methods for interacting with Registration relation.
 * 
 * @author Pankaj Soni
 * 
 */
public interface CustomerDAO extends UserLevels {
	/**
	 * Create new user.
	 * 
	 * @param customerDtoReq
	 * @return boolean
	 */
	boolean createCustomer(CustomerDto customerDtoReq);

	/**
	 * Check whether user pre-exists in system.
	 * 
	 * @param customerDtoReq
	 * @return boolean
	 */
	boolean isExistingUser(CustomerDto customerDtoReq);

	/**
	 * Update user details.
	 * 
	 * @param customerDtoReq
	 * @return boolean
	 */
	boolean updateCustomer(CustomerDto customerDtoReq);

	/**
	 * Retrive user detail.
	 * 
	 * @param ssn
	 * @return RegistrationDto
	 */
	CustomerDto findCustomer(String ssn);

	/**
	 * Retrives list of all the users.
	 * 
	 * @return List
	 */
	List<CustomerDto> findCustomers();

	/**
	 * Search users
	 * 
	 * @param ssn
	 * @return List
	 */
	List<CustomerDto> findCustomers(String ssn);

	/**
	 * Deletes the user.
	 * 
	 * @param ssn
	 * @return total user deleted
	 */
	void deleteCustomer(String ssn);

	/**
	 * User authentication
	 * 
	 * @param customerDtoReq
	 * @return {@link UserLevels}
	 */
	int authenticateUser(CustomerDto customerDtoReq);
}
